<form method="post" class="form-x dux-form form-auto" id="form" action="{:U()}">
    <div class="panel dux-box  active">
        <div class="panel-head">
            <strong>{$name}配置</strong>
        </div>
        <div class="panel-body">
           <div class="form-group">
                <div class="label">
                    <label for="sitename">配置名称</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="name" name="name" size="60" datatype="s" value="{$info['name']}">
                    <div class="input-note">备注名称</div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">最大文件大小</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="upload_size" name="upload_size" size="60" datatype="n" value="{:default_data($info['upload_size'],10)}">
                    <div class="input-note">单位：M</div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">上传文件格式</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="upload_exts" name="upload_exts" size="60"  datatype="*" value="{:default_data($info['upload_exts'],'jpg,gif,bmp,png')}">
                    <div class="input-note">用英文逗号分割</div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">覆盖同名文件</label>
                </div>
                <div class="field">
                        <div class="button-group button-group-small radio">
                            <if condition="$info['upload_replace'] neq ''">
                            <label class="button active"><input name="upload_replace" value="1" checked="checked" type="radio">
                            <else/>
                            <label class="button"><input name="upload_replace" value="1" type="radio">
                            </if>
                            <span class="icon icon-check"></span> 开启</label>
                            <if condition="$info['upload_replace'] eq ''">
                            <label class="button active"><input name="upload_replace" checked="checked" value="0" type="radio">
                            <else/>
                            <label class="button"><input name="upload_replace" value="0" type="radio">
                            </if>
                            <span class="icon icon-times"></span> 关闭</label>
                        </div>
                        <div class="input-note">只对比文件名称</div>
                    </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">缩图开关</label>
                </div>
                <div class="field">
                        <div class="button-group button-group-small radio">
                            <if condition="$info['thumb_status'] neq ''">
                            <label class="button active"><input name="thumb_status" value="1" checked="checked" type="radio">
                            <else/>
                            <label class="button"><input name="thumb_status" value="1" type="radio">
                            </if>
                            <span class="icon icon-check"></span> 开启</label>
                            <if condition="$info['thumb_status'] eq ''">
                            <label class="button active"><input name="thumb_status" checked="checked" value="0" type="radio">
                            <else/>
                            <label class="button"><input name="thumb_status" value="0" type="radio">
                            </if>
                            <span class="icon icon-times"></span> 关闭</label>
                        </div>
                        <div class="input-note">开启后缩略图设置才会生效</div>
                    </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">水印开关</label>
                </div>
                <div class="field">
                        <div class="button-group button-group-small radio">
                            <if condition="$info['water_status'] neq ''">
                            <label class="button active"><input name="water_status" value="1" checked="checked" type="radio">
                            <else/>
                            <label class="button"><input name="water_status" value="1" type="radio">
                            </if>
                            <span class="icon icon-check"></span> 开启</label>
                            <if condition="$info['water_status'] eq ''">->
                            <label class="button active"><input name="water_status" checked="checked" value="0" type="radio">
                            <else/>
                            <label class="button"><input name="water_status" value="0" type="radio">
                            </if>
                            <span class="icon icon-times"></span> 关闭</label>
                        </div>
                        <div class="input-note">开启后水印设置才会生效</div>
                    </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">缩图方式</label>
                </div>
                <div class="field">
                        <select class="input" name="thumb_type" id="thumb_type">
                            <if condition="$info['thumb_type'] eq '1'">
                            <option value="1" selected>
                            <else/>
                            <option value="1">
                            </if>
                            等比例缩放</option>
                            <if condition="$info['thumb_type'] eq '2'">
                            <option value="2" selected>
                            <else/>
                            <option value="2">
                            </if>
                            缩放后填充</option>
                            <if condition="$info['thumb_type'] eq '3'">
                            <option value="3" selected>
                            <else/>
                            <option value="3">
                            </if>
                            居中裁剪</option>
                            <if condition="$info['thumb_type'] eq '4'">
                            <option value="4" selected>
                            <else/>
                            <option value="4">
                            </if>
                            左上角裁剪</option>
                            <if condition="$info['thumb_type'] eq '5'">
                            <option value="5" selected>
                            <else/>
                            <option value="5">
                            </if>
                            右下角裁剪</option>
                            <if condition="$info['thumb_type'] eq '6'">
                            <option value="6" selected>
                            <else/>
                            <option value="6">
                            </if>
                            固定尺寸缩放</option>
                          </select>
                        <div class="input-note">选择开启缩图后有效</div>
                    </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">缩放宽度</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="thumb_width" name="thumb_width" size="60" datatype="n" value="{:default_data($info['thumb_width'],400)}">
                    <div class="input-note">单位：M</div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">缩放高度</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="thumb_height" name="thumb_height" size="60" datatype="n" value="{:default_data($info['thumb_height'],400)}">
                    <div class="input-note">单位：M</div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">水印图片</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="water_image" name="water_image" size="60" datatype="*" value="{:default_data($info['water_image'],'logo.jpg')}">
                    <div class="input-note">位于public/watermark下的图片文件</div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label for="sitename">水印位置</label>
                </div>
                <div class="field">
                        <select class="input" name="water_position" id="water_position">
                            
                            <if condition="$info['water_position'] eq '1'">
                            <option value="1" selected>
                            <else/>
                            <option value="1">
                            </if>
                            左上角水印</option>
                            <if condition="$info['water_position'] eq '2'">
                            <option value="2" selected>
                            <else/>
                            <option value="2">
                            </if>
                            上居中水印</option>
                            <if condition="$info['water_position'] eq '3'">
                            <option value="3" selected>
                            <else/>
                            <option value="3">
                            </if>
                            右上角水印</option>
                            <if condition="$info['water_position'] eq '4'">
                            <option value="4" selected>
                            <else/>
                            <option value="4">
                            </if>
                            左居中水印</option>
                            <if condition="$info['water_position'] eq '5'">
                            <option value="5" selected>
                            <else/>
                            <option value="5">
                            </if>
                            居中水印</option>
                            <if condition="$info['water_position'] eq '6'">
                            <option value="6" selected>
                            <else/>
                            <option value="6">
                            </if>
                            右居中水印</option>
                            <if condition="$info['water_position'] eq '7'">
                            <option value="7" selected>
                            <else/>
                            <option value="7">
                            </if>
                            左下角水印</option>
                            <if condition="$info['water_position'] eq '8'">
                            <option value="8" selected>
                            <else/>
                            <option value="8">
                            </if>
                            下居中水印</option>
                            <if condition="$info['water_position'] eq '9'">
                            <option value="9" selected>
                            <else/>
                            <option value="9">
                            </if>
                            右下角水印</option>
                          </select>
                        <div class="input-note">选择开启缩图后有效</div>
                    </div>
            </div>
        </div>
        <div class="panel-foot">
            <div class="form-button">
                <div id="tips"></div>
                <input type="hidden" name="id" type="hidden" value="{$info['id']}">
                <button class="button bg-main" type="submit">保存</button>
                <button class="button bg" type="reset">重置</button>
            </div>
        </div>
    </div>
</form>
<script>
    Do.ready('base', function () {
        $('#form').duxFormPage();
    });
</script>